package cn.xopencode.securityservice.enums.danger;

import cn.xopencode.common.framework.core.IntArrayValuable;

import java.util.Arrays;

/**
 * 反三违事故级别枚举
 */
public enum DangerLevelEnum implements IntArrayValuable {
    TEAM(1, "班组级"),
    WORKSHOP(2, "车间级"),
    COMPANY(3, "公司级");

    public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(DangerLevelEnum::getLevel).toArray();

    /**
     *  级别
     */
    private final Integer level;
    /**
     * 描述
     */
    private final String name;

    DangerLevelEnum(Integer level, String name) {
        this.level = level;
        this.name = name;
    }

    public Integer getLevel() {
        return level;
    }

    public String getName() {
        return name;
    }

    @Override
    public int[] array() {
        return ARRAYS;
    }

}
